#if !defined(AFX_FACTORCONFDLG_H__1F10D7D3_CB1A_45E7_AE8C_7BA265BEAF49__INCLUDED_)
#define AFX_FACTORCONFDLG_H__1F10D7D3_CB1A_45E7_AE8C_7BA265BEAF49__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
// FactorConfDlg.h : header file
//

/////////////////////////////////////////////////////////////////////////////
// CFactorConfDlg dialog

class CFactorConfDlg : public CDialog
{
// Construction
public:
	CFactorConfDlg(CWnd* pParent = NULL);   // standard constructor

// Dialog Data
	//{{AFX_DATA(CFactorConfDlg)
	enum { IDD = IDD_FACTOR_CONF_DLG };
	CListCtrl	m_listFactor;
	double	m_facAlarmL1;
	double	m_facAlarmL2;
	double	m_facAlarmU1;
	double	m_facAlarmU2;
	double	m_facDevL;
	double	m_facDevU;
	int		m_facID;
	CString	m_facMemo;
	CString	m_facName;
	double	m_facRangeL;
	double	m_facRangeU;
	CString	m_facUnit;
	//}}AFX_DATA


// Overrides
	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CFactorConfDlg)
	protected:
	virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
	//}}AFX_VIRTUAL
private:
	_variant_t m_vfacID,m_vfacUnit,m_vfacName,m_vfacAlarmL1,m_vfacAlarmL2,m_vfacAlarmU1,m_vfacAlarmU2,
		m_vfacRangeL,m_vfacRangeU,m_vfacDevL,m_vfacDevU,m_vfacMemo;
	_RecordsetPtr m_pRecordset;
	
	BOOL m_bSuccess;
	int m_nCurrentSel;
	
	int CheckValid();
	void SetBtnState();
	void LoadData();
	void SaveData();
// Implementation
protected:

	// Generated message map functions
	//{{AFX_MSG(CFactorConfDlg)
	afx_msg void OnItemchangedListFactor(NMHDR* pNMHDR, LRESULT* pResult);
	afx_msg void OnClose();
	virtual BOOL OnInitDialog();
	afx_msg void OnBtnAdd();
	afx_msg void OnBtnDelete();
	afx_msg void OnBtnModify();
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()
};

//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.

#endif // !defined(AFX_FACTORCONFDLG_H__1F10D7D3_CB1A_45E7_AE8C_7BA265BEAF49__INCLUDED_)
